import request from '@/router/axios';
import {
  fenExYuangettoFixed, getAppealTypes, getIs_sup_payment,
  getLineName, getMappingStatus,
  getNoticeStates,
  getStationName, is_sup_payment,
  allStatus, getMappingStatusArray,data_source_status,getData_source_status,getSCOrLCOrACC,
} from "../../../subwayRat/commonCheck";

/**
 * tvm列表
 * @param query
 */
export function get_cz_xw_SwAuTvmMoneyAssistList(query) {
  return request({
    url: '/check/cz_xw/get_cz_xw_SwAuTvmMoneyAssistList',
    method: 'post',
    params: query,
    data:query,
  })
}

export function get_tvm_other_ZN_Option() {
  return {
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: true,
    reserveSelection: false,
    height: 450,
    column: [
      {
        hide: false,
        label: '线路',
        prop: 'lineCode',
        type: 'select',
        search: true,
        searchslot:true,
        formatter: function(row, value , label, column){
          return getLineName(value);
        }
      }, {
        hide: false,
        label: '站点',
        prop: 'stationCode',
        type: 'select',
        search: true,
        searchslot:true,
        formatter: function(row, value , label, column){
          return getStationName(row.lineCode,value);
        }
      },
      {label: "收入日期", prop: "recordTime",type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',search:true,width:90},
      {label: "TVM编号", prop: "tvmCode",type:'select',search:true,searchslot:true,},
      {label: "卸载状态", prop: "boxUninstallStatus",type:'select',search:true,dicData:getMappingStatusArray('BOX_UNINSTALL_STATUS'),formatter:function (row,v) {
          return getMappingStatus('BOX_UNINSTALL_STATUS',v);
        }},
        {label: "系统金额", prop: "systemMoney",formatter:function (row,v) {
          return fenExYuangettoFixed(row,'systemMoney');
        }},
        {label: "实点金额", prop: "actualMoney",formatter:function (row,v) {
          return fenExYuangettoFixed(row,'actualMoney');
        }},
        {label: "差异金额", prop: "diffMoney",formatter:function (row,v) {
          return fenExYuangettoFixed(row,'diffMoney');
        }},
        {label: "手工清出金额", prop: "handOutMoney",width:95,formatter:function (row,v) {
          return fenExYuangettoFixed(row,'handOutMoney');
        }},
        {
          label: '数据来源',
          prop: 'dataSource',
          formatter :function(row, value , label, column){
            return getSCOrLCOrACC(value);
          },
          type:'select',
          dicData: [
          //   {
          //   label: '结账单据',
          //   value: 1
          // },
          {
            label: 'SC',
            value: 2
          },{
            label: 'LC',
            value: 3
          },{
            label: 'ACC',
            value: 4
          },{
            label: '单台设备差异协查结果',
            value: 5
          },{
            label: '分钱箱审核结果',
            value: 6
          },{
            label: '修正',
            value: '1'
          }]
        }, 
        {
          label: "差异来源",
          prop: "sysDataSource", 
          type: 'select',
          dicData: data_source_status(),
          formatter: function (row, v) {
            return getData_source_status(v);
          }
        },            
        {label: "SC系统售票金额", prop: "scCashSellTicket",width:115,formatter:function (row,v) {
          return fenExYuangettoFixed(row,'scCashSellTicket');
        }},
        {label: "SC系统充值金额", prop: "scCashRecharge",width:115,formatter:function (row,v) {
          return fenExYuangettoFixed(row,'scCashRecharge');
        }},
        {label: "SC系统退款金额", prop: "scCashReturn",width:115,formatter:function (row,v) {
          return fenExYuangettoFixed(row,'scCashReturn');
        }},
        // {label: "LC系统售票金额", prop: "lcCashSellTicket",width:115,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'lcCashSellTicket');
        // }},
        // {label: "LC系统充值金额", prop: "lcCashRecharge",width:115,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'lcCashRecharge');
        // }},
        // {label: "LC系统退款金额", prop: "lcCashReturn",width:115,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'lcCashReturn');
        // }},
        // {label: "ACC系统售票金额", prop: "accCashSellTicket",width:120,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'accCashSellTicket');
        // }},
        // {label: "ACC系统充值金额", prop: "accCashRecharge",width:120,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'accCashRecharge');
        // }},
        // {label: "ACC系统退款金额", prop: "accCashReturn",width:120,formatter:function (row,v) {
        //   return fenExYuangettoFixed(row,'accCashReturn');
        // }},
        {label: "通知时间", prop: "sendTime",format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',width:90},
    ]
  }
}
